package com.xian.create;

public class ArrayDemo5 {
    public static void main(String[] args) {
        //目标：掌握动态初始化元素默认值的规则

        //1.整型数组的元素默认值都是0
        int[] arr = new int[10];
        System.out.println(arr[0]);

        //2.字符数组的元素默认值都是0
        char[] chars = new char[10];
        System.out.println((int)chars[0]);

        //3.浮点型数组的元素默认值都是0.0
        double[] scores = new double[100];
        System.out.println(scores[55]);

        //4.布尔型数组的元素默认值都是false
        boolean[] bo = new boolean[100];
        System.out.println(bo[55]);

        //5.引用数据类型数组的元素默认值都是null  引用数据类型--类、接口、数组、String
        String[] str = new String[100];
        System.out.println(str[55]);

    }
}
